package com.hundsun.yr.universal.p2p.bean.enums;

import java.util.ArrayList;
import java.util.HashMap;

import com.hundsun.yr.universal.p2p.bean.UserPersonalInfo;
import com.hundsun.yr.universal.p2p.bean.enums.base.Enum;
import com.hundsun.yr.universal.p2p.bean.enums.base.LabelEnum;
/**
 * 职业身份枚举类
 * @author tonglj
 *
 */
public class WorkStatusEnum extends LabelEnum{

	/**
	 * 
	 */
	private static final long serialVersionUID = 1L;

	
	public static WorkStatusEnum WAGE_EARNER = new WorkStatusEnum("WAGE_EARNER", "工薪族");
	public static WorkStatusEnum ENTERPRISE_FAMILY = new WorkStatusEnum("ENTERPRISE_FAMILY", "企业族");
	public static WorkStatusEnum E_BUSINESSMEN = new WorkStatusEnum("E_BUSINESSMEN", "网商");
	public static WorkStatusEnum STUDENT = new WorkStatusEnum("STUDENT", "学生");
	public static WorkStatusEnum OTHERS = new WorkStatusEnum("OTHERS", "其他");
	

	private static HashMap<String,String> mHashMap = new HashMap<String,String>();
	
	protected WorkStatusEnum(String name, String lable) {
		super(name, lable, UserPersonalInfo.WORKSTATUS);
		title = "职业身份";
	}
	
	@SuppressWarnings("unchecked")
	public static ArrayList<LabelEnum> getList() {
		mList.clear();
		mList.addAll(Enum.getEnumList(WorkStatusEnum.class));
		return mList;
	}

	public static HashMap<String,String> getHashMap(){
		if(mHashMap==null || mHashMap.size()==0){ //保证mHashMap只进行一次赋值，只遍历一次mList
			ArrayList<LabelEnum> list = getList();
			for(LabelEnum labelEnum : list){
				mHashMap.put(labelEnum.getName(), labelEnum.getLable());
			}
		}
		return mHashMap;
	}


}
